package view;

import server.FirewallSession;

/**
 * Class is responsible for window where user enters the new logger depth he want to see.
 */
public class LoggerDepthFrame extends AbstractTextFieldFrame
{	
	private static final long serialVersionUID = -5963890360173882762L;

	/**
	 * C'tor
	 * Define the frame
	 */
	public LoggerDepthFrame(FirewallSession UI)
	{
		super("Logger depth", "Enter the logger history depth:");
		this.UI = UI;
	}
	
	/**
	 * server controller
	 */
	public FirewallSession UI;
	
	/**
	 * Action performed by finish button press
	 */
	protected void finishAction()
	{
		String s = textFiled.getText();
		Settings.historyDepth =Integer.parseInt(s);
		LoggerTable.currentLoggerTable.build();
		StatisticsTable.currentStatisticsTable.build();
		dispose();
	}
}
